package com.zed.api.useradmin;

/**
 * 重复创建相同账号时抛出的例外
 * @author Zed
 *
 */
public class AccountExistsException extends AccountException {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 9052332056532715701L;
	private String id;

	/**
	 * 
	 */
	public AccountExistsException(String id) {
		super("account is exists: id=".concat(id));
		this.id = id;
	}

	/**
	 * 编号
	 * @return {@link String}
	 */
	public String getId(){
		return this.id;
	}

	@Override
	public String getLocalizedMessage() {
		return String.format("账号[编号=%s]已经存在", getId());
	}

	
}
